package zx.x.modules.yshbms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import zx.x.common.utils.PageUtils;
import zx.x.common.utils.Query;
import zx.x.modules.yshbms.dao.CommunityBulletinDao;
import zx.x.modules.yshapp.entity.CommunityBulletinEntity;
import zx.x.modules.yshbms.service.CommunityBulletinService;

import java.util.Map;


@Service("communityBulletinService")
public class CommunityBulletinServiceImpl extends ServiceImpl<CommunityBulletinDao, CommunityBulletinEntity> implements CommunityBulletinService {
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CommunityBulletinEntity> page = this.page(
                new Query<CommunityBulletinEntity>().getPage(params),
                new QueryWrapper<CommunityBulletinEntity>().orderBy(true, false, "cj_time")
        );

        return new PageUtils(page);
    }
}